package com.teatrace.model.process;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="process_type")
public class ProcessType {
	@Id
	@Column(name="process_type_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long id;
	
    private String name;
    private String description;
    private int deleted;
    
    @OneToMany(mappedBy="processtype",cascade=CascadeType.REMOVE)
    private Set<Consist> consists = new HashSet();
   
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getDeleted() {
		return deleted;
	}
	public void setDeleted(int deleted) {
		this.deleted = deleted;
	}
	public Set<Consist> getConsists() {
		return consists;
	}
	public void setConsists(Set<Consist> consists) {
		this.consists = consists;
	}
}
